Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor data access and Ruleset #72

Merged
merged 2 commits into from
Nov 1, 2016

Conversation

dinoboff
Copy link
Collaborator

@dinoboff dinoboff commented Oct 29, 2016

  • Separate RuleDataSnapshot methods by purpose:

    • Snapshot methods have been left in the RuleDataSnapshot class;
    • Methods to convert data from/to a firebase data three are in a new DataNode class;
    • Methods to manipulate the data in the Database class.
  • Refactor Ruleset:

    • Shared method to evaluate read and write permission (via RuleNode#$traverse).
    • Shared method to set wildchildren (via RuleNode#$child(path)).
    • Shared methods report the result (via Result).
    • Separate logic to parse the ruleset (RuleNode and Rule), the logic to walk the rules and evaluate them to simulate operation (RuleSet), and the logic to report the results (Result).

Fix #73

@dinoboff dinoboff force-pushed the refactor-data-access branch from effc7fc to 9e56711 Compare October 29, 2016 12:49
@dinoboff dinoboff changed the title Refactor data access Refactor data access and Ruleset Oct 31, 2016
@dinoboff dinoboff force-pushed the refactor-data-access branch 2 times, most recently from 1876c7c to 2fda81f Compare October 31, 2016 20:44
@dinoboff dinoboff force-pushed the refactor-data-access branch from 2fda81f to 1dbb475 Compare November 1, 2016 02:26
@dinoboff dinoboff merged commit 72ae653 into goldibex:next Nov 1, 2016
@dinoboff dinoboff added this to the 3.0 milestone Nov 1, 2016
@dinoboff dinoboff deleted the refactor-data-access branch December 9, 2016 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant